1. Field of the Invention
The present invention relates to an electronic computer such as a scientific electronic calculator.
2. Description of the Prior Art
In a scientific calculator which is generally used in recent years, with respect to binary operators for arithmetic operations, etc., one binary operator can be entered between two operands using infix notation in a normal expression order instead of using reverse Polish notation (postfix notation). With respect to unary operators for trigonometric functions, square roots or other operations (which are mostly referred to as functions in the calculator), since it is convenient that the calculation is performed immediately after the entry of a unary operator, the unary operator is entered after an operand (a postfix unary operator which is hereinafter referred to as "a postfix function), unlike the notation of a normal expression. In such a scientific calculator, especially when a calculation is performed by using two or more operators, it is more likely that the key depression procedure is confused due to the difference between the entry order and the order of the operands and operators of the normal expression.
As a solution of this problem, a scientific calculator has been developed in which the unary operator for the trigonometric function, square root or other operations are set as unary operators to be entered before the operand (a prefix unary operator which is hereinafter referred to as "a prefix function"), and the unary operator can be entered before the operand in accordance with the notation of the normal expression.
In such a conventional scientific calculator, as shown in FIG. 3, a key operation panel 1 is provided in the center and lower portions of the surface of the body and a liquid crystal display (LCD) panel 2 is provided in the upper portion thereof.
The key operation panel 1 includes numeric keys 11, arithmetic operation keys 12 and mathematical function keys 13 for entering an expression consisting of operands and operators. The numeric keys 11 are used for entering numeric values by respective keys [0]-[9], etc. The arithmetic operation keys 12 such as an addition [+] key 12a and a multiplication [.times.] key 12b are used for entering binary operators. The binary operators are entered using infix notation. The key operation panel 1 further includes operational function keys 14 for performing other operations, memory keys 15 and other keys. There is provided an equal [=] key 16 associated with the arithmetic operation keys 12. By the depression of this key, the calculation of the entered expression is performed.
The mathematical function keys 13 such as a sine [sin] key 13a and a square root [.sqroot.] key 13b are used for entering unary operators, and also for entering a binary operator such as an exponent operator for calculating the xth power of y. The unary operator entered by the sine [sin] key 13a, the square root [.sqroot.] key 13b, or the like is set as a prefix unary operator (a prefix function) which is entered before the operand, so that the entry order can be equivalent to the order of the operands and the operators of the normal expression. If it is natural to enter an operator such as a square operator entered by a square [x.sup.2 ] key 13c after the operand, the operator is set as a postfix unary operator (a postfix function). The entry order in the case where a binary operator is to be entered by one of the mathematical function keys 13 is managed the same as the entry order in the case of the arithmetic operation keys 12. Moreover, in a conventional scientific calculator, even when a unary operator is entered by one of the mathematical function keys 13, the calculation is not performed until the equal [=] key 16 is depressed.
These are provided parenthesis keys 17 associated with the mathematical function keys 13. The parenthesis keys 17 comprise a left parenthesis [(] key and a right parenthesis [)] key which are used for performing the calculation of the entered expression in accordance with a different order from the order of priority of the operator.
The operational function keys 14 include a power turn-on [ON] key 14a, a second function [2ndF] key 14b for selecting another function for each key, a delete [DEL] key 14c for editing the entered expression, and other keys. The memory keys 15 are provided for operating a memory for temporary storage, and comprise a memory [x.fwdarw.M] key 15a for storing the numeric value or the calculated result into a memory, a recall memory [RM] key 15b for recalling the stored numeric value, etc.
The LCD panel 2 displays an expression consisting of operands and operators entered by the above-mentioned keys or the calculated result.
Since the unary operator priority is normally set to the highest, when the result obtained by using another operator is used as the operand for the unary operator, the expression for obtaining the operand must be parenthesized. However, when the operand for the prefix unary operator is to be parenthesized, the user is forced to operate keys in the reverse order to the calculation order. This is not at all convenient, when one performs the entry while thinking the expression.
For example, in the scientific calculator shown in FIG. 3, when the result obtained by using the addition operator (+) of binary operator is used as the operand for the sine operator (sin) of prefix unary operator, as shown in Table 1, the sine [sin] key 13a is first depressed (procedure 11). Next, a parenthesized add expression is entered by using the parenthesis keys 17, numeric keys 11 and addition [+] key 12a (procedure 12). Finally, the result is obtained by depressing the equal [=] key 16 (procedure 13). In this case, the sine [sin] key 13a is first depressed and then the addition [+] key 12a is depressed, in the reverse order to the calculation order.
TABLE 1 ______________________________________ Procedure Key operation Display after the operation ______________________________________ 11 [sin] sin.sub.-- 12 (10 + 20) sin(10 + 20).sub.-- 13 [=] 0.5 ______________________________________
When the result obtained by using another operator is used as the operand for the prefix unary operator as described above, it is sometimes required that the calculation using the prefix unary operator is performed after checking the result obtained by using another operator. If the result is first obtained by using another operator and then the obtained result is used as the operand for the prefix unary operator, it is necessary to enter the same numeric value as that of the result by using the numeric keys again, or it is necessary to depress the memory key for temporarily storing the obtained result into the memory or to depress a last answer key for recalling the last obtained result. This causes the key operation to be troublesome.
Specifically, in the scientific calculator shown in FIG. 3, the numeric keys 11, addition [+] key 12a and equal [=] key 16 are first operated to obtain the result of the add expression (procedure 21), as shown in Table 2. Then, the obtained result is stored in the memory once by depressing the memory [x.fwdarw.M] key 15a (procedure 22). After depressing the sine [sin] key 13a (procedure 23), the stored result in the memory is recalled by depressing the recall memory [RM] key 15b (procedure 24). Finally, the result is obtained by depressing the equal [=] key 16 (procedure 25). In this case, the depression of the memory keys 15 in procedures 22 and 24 is the extra operation, as compared with the case of the usual scientific calculator in which the sine operator (sin) is set as a post-fix unary operator.
TABLE 2 ______________________________________ Procedure Key operation Display after the operation ______________________________________ 21 10 + 20 30. 22 [x.fwdarw.M] M 30. 23 [sin] sin.sub.-- 24 [RM] M sin 30..sub.-- 25 [=] 0.5 ______________________________________
As a result, in the conventional scientific calculator to which an expression can be entered in the order of normal notation, when a complicated calculation which necessitates parentheses is to be performed, or when it is required to sequentially calculate checking the results step by step, there arises a problem in that the key operation becomes troublesome.
Even in a conventional scientific calculator as shown in FIG. 3, when the add calculation is performed (procedure 31) and then the multiplication operator of binary operator is entered by depressing the multiplication [.times.] key 12b (procedure 32), the result from the above add calculation can be directly used as the first operand for the multiplication operator, for example as shown in Table 3.
TABLE 3 ______________________________________ Procedure Key operation Display after the operation ______________________________________ 31 10 + 20 = 30. 32 [x] 30.x.sub.-- ______________________________________
In another case, where a square operator of postfix unary operator is entered by depressing the square [x.sup.2 ] key 13c (procedure 42) after the add calculation is performed (procedure 41), for example as shown in Table 4, the result from the above add calculation can be directly used as the operand for the square operator.
TABLE 4 ______________________________________ Procedure Key operation Display after the operation ______________________________________ 41 10 + 20 = 30. 42 [x.sup.2 ] 30..sup.2 .sub.-- ______________________________________